<?php

/**
 * usuario actions.
 *
 * @package    hegeprosoft
 * @subpackage usuario
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $
 */
class usuarioActions extends sfActions
{
  public function executeLogin(sfWebRequest $request)
  {

      $parametros=$request->getParameter('signin');
      $c = new Criteria();
      $c->add(UsuarioPeer::USU_LOGINUSUARIO,$parametros['login']);
      $c->add(UsuarioPeer::USU_CONTRASENAUSUARIO,$parametros['pass']);
      $usuarios = UsuarioPeer::doSelect($c);
      
      if($usuarios){
          return $this->renderText('{success: true}');

          
      }else
      {
         return $this->renderText('{failure: true}');
 
      }


//--
       return $this->renderText('{failure: true}');

    $request->checkCSRFProtection();

    $this->forward404Unless($usuario = UsuarioPeer::retrieveByPk($request->getParameter('usu_loginusuario')), sprintf('Object usuario does not exist (%s).', $request->getParameter('usu_loginusuario')));
    $usuario->delete();

    $this->redirect('usuario/index');
  }

}
